package com.example.springbootdemo.service;

import java.util.Arrays;
import java.util.List;

import org.springframework.stereotype.Service;

import com.example.springbootdemo.model.User;

@Service
public class UserService {

    /**
     * 获取所有用户
     * 这里只是返回一些模拟数据
     */
    public List<User> getAllUsers() {
        return Arrays.asList(
            new User(1, "张三", "zhangsan@example.com"),
            new User(2, "李四", "lisi@example.com"),
            new User(3, "王五", "wangwu@example.com")
        );
    }
}